Host-available device block map for optimized file retrieval from serpentine tape drives

ABSTRACT

A method, apparatus, and article of manufacture for optimizing the retrieval of blocks of data from a tape media of a longitudinal serpentine tape drive. A device block map (DBM) is retrieved from the tape media and stored in memory. The DBM comprises a table having one or more rows and one or more columns for each block of data stored on the tape media. The columns are selected from a group comprising a wrap column, a position column, a logical block number column, and a file identifier column, wherein the wrap column indicates a track where the block of data is recorded on the tape media, the position column indicates a physical position where the block of data is recorded on the tape media, the logical block number column indicates a logical block number for the block of data, and a file identifier column indicates a logical file identifier for the block of data. One or more retrieval paths for the blocks of data are determined from the device block map, wherein each of the retrieval paths comprises an ordered sequence of the blocks of data and the manner in which the tape media is to be traversed to accomplish the retrieval of the ordered sequence. A sum of distances is determined for each of the retrieval paths and an optimal one of the retrieval paths is selected based on the determined sum of distances. Thereafter, the blocks of data are retrieved from the tape media using the optimal retrieval path.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention.

[0002] The present invention relates in general to a file retrievalsystem, and in particular, to a file retrieval system including ahost-available device block map for optimally retrieving one or moreblocks of data from a serpentine tape drive.

[0003] 2. Description of Related Art.

[0004] As computer technology develops, data storage systems have becomemore sophisticated and require the storage and retrieval of greateramounts of data. Even though disk-based storage systems have evolvedsignificantly, such storage systems still have problems in terms of bothcost and scalability.

[0005] The use of tape-based storage systems for data processing,backup, and/or archival purposes is well known in the art. For example,tape storage systems have traditionally been applied to sequentialprocessing such as batch updating of master files. Tape storage systemsalso are used in data mining applications where thousands of queries areaggregated in one complete sequential scan of the data.

[0006] Advances in magnetic tape storage technology and devices have ledto greatly increased capacity per cartridge. With the increase incapacity and new applications, there is a concomitant increase in thenumber of objects that may be stored per cartridge. Indeed, the use oftape storage systems can be as much as two orders of magnitude moreefficient than disk storage systems, in terms of cost per byte recordedand the number of bytes stored per unit (cartridge, etc.). However, oneproblem with tape storage systems is that the random access latency oftape is several orders of magnitude slower than disk storage systems.

[0007] New longitudinal tape formats such as IBM 3570 and IBM 3590drives employ a tape track format described as serpentine longitudinal.These formats differ from previous IBM 3480/3490 drives in one regard byhaving higher track densities, thereby resulting in multiple tape passesin both the “out” and “in” directions.

[0008] In contrast, 18 track IBM 3480 drives write data only in the outdirection and 36 track IBM 3490 drives write one set of tracks “out” andone set of tracks “in”. Optimized retrieval sequences for these devicescomprise straightforward sequential ordering with no requirement forspecialized ordering.

[0009] With IBM 3570 and IBM 3590 drives, however, there are 16 “out”and “in” tracks and 4 “out” and “in” tracks, respectively. Access tothese tracks is accomplished by indexing the heads of the drive, aprocess that is very rapid as compared to searching the length of tapemedia.

[0010] In general, a serpentine longitudinal tape drive records data ona wrap (i.e., track) or a group of wraps in one direction along a lengthof the serpentine longitudinal tape media. Then, the tape drive reversesthe recording direction and shifts its recording heads sideways a smalldistance to record another wrap or group of wraps in the oppositedirection along the length of the tape. The tape drive continues theseoperations back and forth along the serpentine longitudinal tape mediauntil all of the blocks of data are written.

[0011] Alternatively, instead of shifting its heads sideways a smalldistance to record another wrap or group of wraps, the serpentinelongitudinal tape drive may electronically select another recording heador group of recording heads and move up the length of the tape media andcontinue back and forth until all of the blocks of data are written tothe tape media. It will be appreciated, of course, that other types ofrecording techniques can be used as well.

[0012] As a result, a straightforward sequential retrieval order forserpentine longitudinal tape drives is most likely not optimized. Thesequential retrieval order usually bears no relationship to the physicallocation of the blocks of data stored on serpentine tape media.Accordingly, the random retrieval of the blocks of data which are spacedapart on the serpentine tape can cause a significant latency. Indeed,for serpentine tape, the random retrieval of blocks of data spacedrelatively far apart on the tape will likely result in grosslysub-optimal performance, if the blocks of data are retrieved insequential order with respect to the order they were written.

[0013] Various techniques and systems for recording data on andretrieving data from a tape and for reducing access latency are known inthe art. For example, the publication by Bruce K. Hillyer and AviSilberschatz, entitled “Random I/O Scheduling in Online Tertiary StorageSystems”, ACM Conference, 1996, describes techniques for I/O schedulingfor tape drives to resolve the problem of access latency. U.S. Pat. No.5,485,321 issued to Leonhardt et al. entitled “Format and Method forRecording Optimization” discloses a serpentine recording technique forreducing access time. U.S. Pat. No. 5,373,485 issued to Hogan et al.entitled “Method for Locating Data in a Data Cartridge System” disclosesa physical and logical block search for data on a serpentine patternwhich eliminates search time. U.S. Pat. No. 5,121,270 issued to Alcudiaet al. entitled “Multitransducer Head Positioning Servo for Use in aBi-directional Magnetic Tape System” discloses a serpentine recordingmode of operation. U.S. Pat. No. 4,858,039 issued to Mintzlaff entitled“Streaming Tape Drive With Direct Block Addressability” disclosesreducing the time for retrieving a selected block of data recorded in aserpentine fashion. U.S. Pat. No. 4,796,20 issued to Glass et al.entitled “System and Method for Encoding and Storing Digital Informationon Magnetic Tape” discloses a system for increasing the speed ofserpentine tape writes and reads. Japanese publication JP 8-235775 (noEnglish language equivalent or abstract are available) discloses adevice for access to linear serpentine tape. Japanese publication JP7-24443 (English abstract only) discloses shortening the access time toa file stored in a magnetic tape of a serpentine track system.

[0014] However, none of these patents or publications provide acompletely satisfactory solution to the above mentioned problems inretrieving files stored on serpentine longitudinal tape media. It shouldthus be apparent that a need exists for methods for optimized fileretrieval from serpentine longitudinal tape media.

SUMMARY OF THE INVENTION

[0015] To overcome the limitations in the prior art described above, andto overcome other limitations that will become apparent upon reading andunderstanding the present specification, the present invention disclosesa method, apparatus, and article of manufacture for optimizing theretrieval of blocks of data from a serpentine longitudinal tape media. Adevice block map (DBM) is stored on the tape media, wherein the DBMcomprises a table having one or more rows and one or more columns foreach block of data stored on the tape media. The columns are selectedfrom a group comprising a wrap column, a position column, a logicalblock number column, and a file identifier column, wherein the wrapcolumn indicates a track where the block of data is recorded on the tapemedia, the position column indicates a physical position where the blockof data is recorded on the tape media, the logical block number columnindicates a logical block number for the block of data, and a fileidentifier column indicates a logical file identifier for the block ofdata. One or more retrieval paths for the blocks of data are determinedfrom the device block map, wherein each of the retrieval paths comprisesan ordered sequence of the blocks of data and the manner in which thetape media is to be traversed to accomplish the retrieval of the orderedsequence. A sum of distances is determined for each of the retrievalpaths and an optimal one of the retrieval paths is selected based on thedetermined sum of distances. Thereafter, the blocks of data areretrieved from the tape media using the optimal retrieval path.

[0016] One advantage of the present invention is that it provides asignificant improvement in the latency of random access to files storedon a serpentine longitudinal tape media. Another advantage is that thepresent invention provides a portable device block map which isaccessible from the tape media.

[0017] Other advantages, features, and characteristics of the presentinvention; methods, operation, and functions of the related elements ofthe structure; combination of parts; and economies of manufacture willbecome apparent from the following detailed description of the preferredembodiments and accompanying drawings, all of which form a part of thisspecification, wherein like reference numerals designate correspondingparts in the various figures.

BRIEF DESCRIPTION OF THE DRAWING

[0018]FIG. 1 is a block diagram of a host available device block mapfile retrieval system consistent with the present invention.

[0019]FIG. 2 is an exemplary device block map in relationship with adepiction of physical locations of files stored on a storage mediumconsistent with the invention.

[0020]FIG. 3 is a flowchart illustrating an operation of determining anoptimized path of retrieving the files consistent with the presentinvention.

DETAILED DESCRIPTION OF THE ILLUSTRATED EMBODIMENTS

[0021] In the following description of the preferred embodiment,reference is made to the accompanying drawings which form a part hereof,and in which is shown by way of illustration a specific embodiment inwhich the invention may be practiced. It is to be understood that otherembodiments may be utilized and structural changes may be made withoutdeparting from the scope of the present invention.

Hardware Environment

[0022]FIG. 1 is an exemplary hardware environment used to implement thepreferred embodiment of the invention. A host computer 10 is coupled viaa bus 12 to a storage controller 14, which itself is coupled via an I/Ochannel 16 to one or more data storage devices 18. In the preferredembodiment, the data storage device 18 comprises a tape drive. Ofcourse, those skilled in the art will recognize that any data storagedevice may be used with the present invention.

[0023] The host computer 10 has its own memory 20 and executes a programor logic 22 that controls the operation of the host computer 10 and itsinteraction with the storage controller 14 and the tape drive 18. In thepreferred embodiment, the program 22 comprises a tape library manager,backup/restore utility or database management system, although otherprograms or logic may be used as well.

[0024] Similarly, the storage controller 14 has its own memory 24 andexecutes a program or logic 24 that controls the operation of thestorage controller 14 and its interaction with the host computer 10 andtape drive 18. In the preferred embodiment, the program 26 provides theread/write logic to the tape drive 18 and the host computer 10, althoughother functions may be provided as well.

[0025] Under the control of the storage controller 14, the tape drive 18retrieves a device block map (DBM) 28 from a specified location on theserpentine longitudinal tape media 30 and stores the DBM 28 in a memory24 of the storage controller 14. The DBM 28 indicates the physicallayout of one or more blocks of data stored on the serpentinelongitudinal tape media 30. Thereafter, some or all of the DBM 28 may betransferred to the host computer 10.

[0026] The program 22 executed by the host computer 10 performs linearinterpolation on the DBM 28 to control the operation of the hostcomputer 10 and its interaction with the storage controller 14 and thetape drive 18, as described in more detail below. The program 22determines one or more retrieval paths for the blocks of data from thetape media 30 using the DBM 28, wherein each of the retrieval pathscomprises an ordered sequence of the blocks of data and the manner inwhich the tape media 30 is to be traversed by the tape drive 18 in orderto accomplish the retrieval of the ordered sequence. The program 22determines a sum of distances for each of the retrieval paths andselects an optimal one of the retrieval paths based on the determinedsum of distances. Thereafter, the host computer 10, under the control ofthe program 22, instructs the controller 14 to retrieve the blocks ofdata from the tape media 30 by the tape drive 18 using the optimalretrieval path.

[0027] Those skilled in the art will recognize that the exemplaryenvironment illustrated in FIG. 1 is not intended to limit the presentinvention. Indeed, those skilled in the art will recognize that otheralternative hardware environments may be used without departing from thescope of the present invention.

[0028] Those skilled in the art will also recognize that the presentinvention may be implemented as a method, apparatus, or article ofmanufacture using standard programming and/or engineering techniques toproduce software, firmware, hardware, or any combination thereof. Theterm “article of manufacture” as used herein is intended to encompassany device, carrier, or media that provides access to instructionsand/or data useful in performing the same or similar functionality. Ofcourse, those skilled in the art will recognize many modifications maybe made to this configuration without departing from the scope of thepresent invention.

Device Block Map

[0029]FIG. 2 is a block diagram that illustrates an exemplary structurefor the DBM 28 according to the present invention. The DBM 28 comprisesa table having one or more rows and one or more columns. In thisexemplary structure, the DBM 28 is comprised of a plurality of rows andat least four columns (Wrap, Pos, Block #, and File #). Each of the rowscorrespond to a block of data stored on the tape media 30 and thecolumns indicate the Wrap (track), Pos (physical position), Block #(logical block number), and File# (logical file identifier) of the blockof data.

[0030] The Wrap value in the DBM 28 indicates the wrap (or track) wherethe block of data is recorded on the serpentine longitudinal tape media30, as is illustrated in FIG. 2. In general, each even numbered wrap isrecorded in a forward direction (to the right in FIG. 2), and each oddnumbered wrap is recorded in a backward direction (to the left in FIG.2). It will be appreciated that the recording sequence can be varied inmany ways, e.g., different directions, alternating directions at someother increment, without departing from the scope or spirit of thepresent invention.

[0031] The Pos value in the DBM 28 indicates the physical position wherethe block of data is recorded on the serpentine longitudinal tape media30. Preferably, a marker or other indicator is recorded at this positionon the tape media 30 to denote the beginning and/or ending location ofone or more adjacent blocks of data. It will be appreciated that anyother position values, such as a middle location of the block of data,can be used without departing from the scope of the present invention.

[0032] The Block # value in the DBM 28 indicates the logical blocknumber for the block of data recorded on the serpentine longitudinaltape media 30. Files are comprised of one or more blocks of data, andeach block of data is recorded separately on the serpentine longitudinaltape media 30.

[0033] The File # value in the DBM 28 indicates the logical file number(or other identifier) for the block of data recorded on the serpentinelongitudinal tape media 30. This allows one or more blocks of data to beidentified as collectively comprising a logical file, even when theblocks of data are recorded at different locations on the serpentinelongitudinal tape media 30.

[0034] For the purposes of illustration in this preferred embodiment,all the blocks of data associated with a particular File # value in theDBM 28 are grouped together as adjacent rows in the DBM 28 and arestored recorded together as adjacent blocks of data on one or more wrapsof the serpentine longitudinal tape media 30. Of course, those skilledin the art will recognize that the blocks of data could be recordednon-contiguously without departing from the scope of the presentinvention.

[0035] Accordingly, upon receiving a request to retrieve one or morefiles from the tape media 30, some or all of the DBM 28 is retrievedfrom the tape media 30 and stored in the memory 24 of the storagecontroller 14. Thereafter, some or all of the DBM 28 is transferred tothe host computer 10 and stored in the memory 20 of the host computer10.

[0036] Using linear interpolation on the DBM 28, the host computer 10generates an image in its memory 20 of the physical layout of thedesired blocks of data stored on the serpentine longitudinal tape media30 and determines the physical location and length of any given block ofdata with a specified accuracy. Thereafter, as a result of this linearinterpolation, the host computer 10 and the tape drive 18 are able todetermine an optimal retrieval path for the blocks of data from theserpentine longitudinal tape media 30.

[0037] Optimizing the retrieval path according to the present inventiontakes into account the wrap format of the serpentine longitudinal tapemedia 30. Hence, by allowing for wrap jumping (a very rapid process) andby using the DBM 28 to determine the longitudinal position of thebeginning and ending points of each of the blocks of data to beretrieved from the media 30, the problem becomes one of minimizing thesum of the travel distance along the tape media for a complete circuitof all the desired files.

[0038] Each subset of the travel distance is defined as:

TO _(ij) =|E ₁ −B _(j|)

[0039] which is the distance from the end of file “i” to the beginningof file “j”. Thus, the optimal retrieval path is:

TO _(opt)=min (σ_(ij) |E ₁ −B _(j)|)

[0040] where the retrieval sequence is optimized to give a minimum valuefor TO_(opt).

[0041] This problem, which is similar to the “traveling salesman” typeof problem, can be described more accurately as being in the class of an“asymmetric Hamiltonian Path” problem. As the number of objectsincrease, the number of possible sequences grows as N! (N factorial).For a large N, the most usual approach to solving this problem is toemploy a heuristic method.

[0042] As described below, the present invention describes one of thesimplest of the many possible such methods and the incorporation of sucha method into the storage subsystem in a manner that interacts with thedata management software and drive logic to give improved multi-objectretrieval response time.

Optimal Retrieval Logic

[0043]FIG. 3 is a flowchart that illustrates the steps performed indetermining an optimal retrieval path according to the presentinvention.

[0044] Block 32 represents the host computer 10 determining one or moreretrieval paths for the files to be retrieved from the serpentinelongitudinal tape media 30 based on the DBM 28. Each of the retrievalpaths comprises an ordered sequence of files to be retrieved from thetape media 30 and the manner in which the tape media 30 is to betraversed by the tape drive 18 to accomplish the retrieval of the filesin the ordered sequence.

[0045] Block 34 represents the host computer 10 determining a sum ofdistances traveled along the tape media 30 to retrieve each of the filesfor each of the retrieval paths. In the preferred embodiment, where allof the blocks of data comprising a file are recorded contiguously, thedistances are defined between an ending location of a last block of datafor a first file and the nearest starting location of a first block ofdata for a second file. Then, the next distance is defined from theending location of the last block of the second file to the neareststarting location of the first block of a third file, and so on. Ofcourse, in other embodiments where the blocks of data are not recordedcontiguously, modifications are required to this calculation.

[0046] Since each retrieval path relates to a different ordering of theretrieval of the desired files, the sum of distances traveled fordifferent retrieval paths most likely are different. The smallest sum ofdistances traveled represents the shortest path for the tape drive 18 totraverse along the tape media 30 to retrieve the desired files. In otherwords, the smallest sum of distances traveled among the differentretrieval paths is the optimal path for the retrieval of the desiredfiles.

[0047] Block 36 represents the host computer 10 selecting the optimizedpath to retrieve the desired files from the tape media 30 via the tapedrive 18.

[0048] In a preferred embodiment, these steps would be performed by alibrary manager 22 executed by the host computer 10. Alternatively,those skilled in the art will recognize that this method could also beperformed by the program or logic 26 in the storage controller 14 ratherthan the host computer 10. In either embodiment, the input would be thefile identifiers and the Beginning and End locations and, the outputwould be the ordered sequence of retrieval of these objects that resultsin minimum total travel distance.

[0049] Although a “nearest neighbor” method of optimal retrieval isdescribed herein as an example, those skilled in the art would recognizethat other methods may be used as well, without departing from the scopeof the present invention. For example, other methods may comprise a“second nearest neighbor”, “third nearest neighbor”, or “nth nearestneighbor” method. Improved methods will undoubtedly be developed andcould be expected to improve upon the minimum travel distance. Further,there may be other more efficient implementations that are morepractical for product use.

Conclusion

[0050] This concludes the description of the preferred embodiment of theinvention. The following paragraphs describe some alternative methods ofaccomplishing the same objects.

[0051] In alternative embodiments of the present invention, other typesand configurations of computers could be used. For example, theinvention need not be restricted to the hardware and softwareconfiguration illustrated herein. For example, mainframes,minicomputers, or personal computers could be used with the presentinvention. In another example, peripherals other than tape drives couldbenefit from the present invention.

[0052] In alternative embodiments of the present invention, otherstructures and values for the device block map (DBM) could be used. Forexample, the invention need not be restricted to tables, rows, orcolumns as illustrated herein. Further, the types of rows and columns,and the data they embody, are not restricted to the those illustratedherein.

[0053] In alternative embodiments of the present invention, the logicdescribed herein could be performed by other types of hardware. Forexample, the invention need not be restricted to programs or logicexecuted by host computers and storage controllers as illustratedherein. Instead, the logic of the invention could be performed byembedded processors or specialized electronic circuitry.

[0054] In alternative embodiments of the present invention, othermethods of optimizing retrieval may use other methods with the deviceblock map (DBM). For example, the invention need not be restricted tothe “traveling salesman” or “Hamiltonian Path” techniques describedherein. Those skilled in the art will recognize that other methods couldoptimize retrieval of data using the device block map of the presentinvention.

[0055] In summary, the present invention discloses a method, apparatus,and article of manufacture for optimizing the retrieval of blocks ofdata from a tape media of a longitudinal serpentine tape drive. A deviceblock map (DBM) is stored on the tape media, wherein the DBM comprises atable having one or more rows and one or more columns for each block ofdata stored on the tape media. The columns are selected from a groupcomprising a wrap column, a position column, a logical block numbercolumn, and a file identifier column, wherein the wrap column indicatesa track where the block of data is recorded on the tape media, theposition column indicates a physical position where the block of data isrecorded on the tape media, the logical block number column indicates alogical block number for the block of data, and a file identifier columnindicates a logical file identifier for the block of data. One or moreretrieval paths for the blocks of data are determined from the deviceblock map, wherein each of the retrieval paths comprises an orderedsequence of the blocks of data and the manner in which the tape media isto be traversed to accomplish the retrieval of the ordered sequence. Asum of distances is determined for each of the retrieval paths and anoptimal one of the retrieval paths is selected based on the determinedsum of distances. Thereafter, the blocks of data are retrieved from thetape media using the optimal retrieval path.

[0056] The foregoing description of the preferred embodiment of theinvention has been presented for the purposes of illustration anddescription. It is not intended to be exhaustive or to limit theinvention to the precise form disclosed. Many modifications andvariations are possible in light of the above teaching. It is intendedthat the scope of the invention be limited not by this detaileddescription, but rather by the claims appended hereto.

What is claimed is:
 1. A method for retrieving one or more blocks ofdata from a tape media, the method comprising the steps of: (a)retrieving a device block map from a tape media; (b) determining anoptimal order to retrieve the blocks of data based on at least a portionof the device block map; and (c) retrieving the blocks of data from thetape media using the determined optimal order.
 2. The method of claim 1, wherein the tape media is a serpentine longitudinal tape media havinga plurality of wraps.
 3. The method of claim 1 , wherein the deviceblock map comprises a table having one or more rows for each block ofdata.
 4. The method of claim 3 , wherein the table has one or morecolumns selected from a group comprising a wrap column, a positioncolumn, a logical block number column, and a file identifier column. 5.The method of claim 4 , wherein the wrap column indicates a track wherethe block of data is recorded on the tape media.
 6. The method of claim4 , wherein the position column indicates a physical position where theblock of data is recorded on the tape media.
 7. The method of claim 6 ,wherein a marker is recorded on the tape media at the physical position.8. The method of claim 6 , wherein the physical position is selectedfrom a group comprising a beginning location, an ending location, and abeginning and ending location.
 9. The method of claim 1 , wherein thedevice block map is stored at a specified location on the tape media.10. The method of claim 1 , wherein the device block map indicates alayout for the blocks of data on the tape media.
 11. The method of claim1 , wherein the determining step comprises the step of interpolating thedevice block map to determine the optimal order to retrieve the blocksof data.
 12. The method of claim 1 , wherein the determining stepcomprises the steps of: (1) determining one or more retrieval pathsbased on the device block map, wherein each of the retrieval pathscomprises an ordered sequence of the blocks of data and the manner inwhich the tape media is to be traversed to accomplish the retrieval ofthe ordered sequence; (2) determining a sum of distances for each of theretrieval paths; (3) selecting an optimal one of the retrieval pathsbased on the determined sum of distances; and (4) retrieving the blocksof data from the tape media using the optimal retrieval path.
 13. Themethod of claim 1 , wherein the optimal order comprises a minimum traveldistance of the tape media.
 14. An apparatus for retrieving one or moreblocks of data from a tape media, comprising: (a) a processor coupled toa tape drive for the tape media; and (b) one or more instructions,performed by the processor, for retrieving a device block map from thetape media, for determining an optimal order to retrieve the blocks ofdata based on at least a portion of the device block map, and forretrieving the blocks of data from the tape media using the determinedoptimal order.
 15. An article of manufacture embodying logic to performmethod steps for retrieving one or more blocks of data from a tape mediaaccessed by a tape drive, the method comprising the steps of: (a)retrieving a device block map from a tape media; (b) determining anoptimal order to retrieve the blocks of data based on at least a portionof the device block map; and (c) retrieving the blocks of data from thetape media using the determined optimal order.
 16. A memory for storingdata for access by a processor coupled to a tape drive, comprising: adevice block map stored in the memory, the device block map comprising atable having one or more rows for each block of data stored on a tapemedia accessed by the processor via the tape drive, the table having oneor more columns selected from a group comprising a wrap column, aposition column, a logical block number column, and a file identifiercolumn, the wrap column indicating a track where the block of data isrecorded on a tape media and the position column indicating a physicalposition where the block of data is recorded on the tape media, whereinat least a portion of the device block map is used by processor todetermine an optimal order to retrieve the blocks of data from the tapemedia.
 17. The memory of claim 16 , wherein the physical position isselected from a group comprising a beginning location, an endinglocation, and a beginning and ending location.
 18. The memory of claim16 , wherein the device block map is stored at a specified location onthe tape media.
 19. The memory of claim 16 , wherein the device blockmap indicates a layout for the blocks of data on the tape media.
 20. Thememory of claim 16 , wherein the device block map is interpolated by theprocessor to determine the optimal order to retrieve the blocks of data.